Differentiability And Piecewise Functions